home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / syncGlobalOptVars.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  2.7 KB  |  82 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. //  Alias|Wavefront Script File
  19. //  MODIFY THIS AT YOUR OWN RISK
  20. //
  21. //  Creation Date: Jan 2000
  22. //
  23. //  Description:
  24. //      This script updates optionVar prefs before writing to disk.
  25. //        This script will be called in batch mode. 
  26. // 
  27.  
  28. global proc syncGlobalOptVars() 
  29. {
  30.     global string $gCommandLine;
  31.  
  32.     // Workspace
  33.     string $curWS = `workspace -fn`;
  34.     if ("" != $curWS) {
  35.         optionVar -sv "lastLocalWS" $curWS;
  36.     }
  37.  
  38.     // Command Line
  39.     int $fieldDimensions[] = `paneLayout -q -ps $gCommandLine`;
  40.     optionVar
  41.         -iv commandLineInputFieldWidth $fieldDimensions[0]
  42.         -iv commandLineNumHistoryLines `commandLine -q -numberOfHistoryLines $gCommandLine`;
  43.  
  44.     //    Hotbox
  45.     optionVar
  46.         -sv hotBoxDisplayStyle `hotBox -q -displayStyle`
  47.         -iv hotBoxTransparencyLevel `hotBox -q -tr`;
  48.  
  49.     optionVar
  50.         -intValue isHotBoxShowAll                  `hotBox -q -a`
  51.         -intValue isHotBoxAnimationRowVisible    `hotBox -q -at`
  52.         -intValue isHotBoxModelingRowVisible     `hotBox -q -mt`
  53.         -intValue isHotBoxDynamicsRowVisible     `hotBox -q -dt`
  54.         -intValue isHotBoxRenderingRowVisible    `hotBox -q -rt`
  55.         -intValue isHotBoxClothRowVisible         `hotBox -q -clt`
  56.         -intValue isHotBoxLiveRowVisible         `hotBox -q -lt`
  57.         -intValue isHotBoxCommonRowVisible       `hotBox -q -ct`
  58.         -intValue isHotBoxPaneSpecificRowVisible `hotBox -q -pt`
  59.         -intValue isHotBoxRmbPopupsOn            `hotBox -q -rmb`;
  60.  
  61.     //  MEL
  62.     optionVar 
  63.         -iv stackTraceIsOn `stackTrace -q -state`
  64.         -iv showLineNumbersIsOn `commandEcho -q -lineNumbers`;
  65.  
  66.     // Display
  67.     global int $gRefreshMode;
  68.     optionVar -iv refreshMode $gRefreshMode;
  69.  
  70.     // Display Layers
  71.     optionVar 
  72.         -iv currentDisplayLayerActive `editDisplayLayerGlobals -q -uc`;
  73.         
  74.     // Shelves
  75.     global string $gShelfTopLevel;
  76.     if (`optionVar -q isShelfSave`) {
  77.         if (`tabLayout -exists $gShelfTopLevel`) {
  78.             saveAllShelves $gShelfTopLevel;        
  79.         }
  80.     }
  81. }
  82.